package cn.ming.leo.bean;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

import com.avaje.ebean.Model;

@Entity
@Table(name = "door_tools")
public class DoorTools extends Model {
	public static Find<String, DoorTools> find = new Find<String, DoorTools>() {
	};

	@Id
	@GeneratedValue
	private Integer id;

	@Temporal(TemporalType.TIMESTAMP)
	private Date updateTime;

	private String createTime;

	private int toolsId;

	private int doorId;

	private int putUserId;

	@Transient
	private String putUserName;
	@Transient
	private String takeUserName;

	private int takeUserId;

	private String takeTime;

	private String returnTime;

	private int status;

	@OneToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "tools_id", insertable = false, updatable = false)
	private Tools tools;

	private String repairTime;

	public String getRepairTime() {
		return repairTime;
	}

	public void setRepairTime(String repairTime) {
		this.repairTime = repairTime;
	}

	public static Find<String, DoorTools> getFind() {
		return find;
	}

	public static void setFind(Find<String, DoorTools> find) {
		DoorTools.find = find;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public String getCreateTime() {
		return createTime;
	}

	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}

	public int getToolsId() {
		return toolsId;
	}

	public void setToolsId(int toolsId) {
		this.toolsId = toolsId;
	}

	public int getDoorId() {
		return doorId;
	}

	public void setDoorId(int doorId) {
		this.doorId = doorId;
	}

	public int getPutUserId() {
		return putUserId;
	}

	public void setPutUserId(int putUserId) {
		this.putUserId = putUserId;
	}

	public int getTakeUserId() {
		return takeUserId;
	}

	public void setTakeUserId(int takeUserId) {
		this.takeUserId = takeUserId;
	}

	public String getTakeTime() {
		return takeTime;
	}

	public void setTakeTime(String takeTime) {
		this.takeTime = takeTime;
	}

	public String getReturnTime() {
		return returnTime;
	}

	public void setReturnTime(String returnTime) {
		this.returnTime = returnTime;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public Tools getTools() {
		return tools;
	}

	public void setTools(Tools tools) {
		this.tools = tools;
	}

	public String getPutUserName() {
		return putUserName;
	}

	public void setPutUserName(String putUserName) {
		this.putUserName = putUserName;
	}

	public String getTakeUserName() {
		return takeUserName;
	}

	public void setTakeUserName(String takeUserName) {
		this.takeUserName = takeUserName;
	}

}
